10 'TRAPDSGN - 07 SEP 92 - adapted from HARTRPDI, by A.C.(AL) Buxton W8NX
20 ' 2225 Woodpark Rd.
30 ' Akron, Ohio 44333
40 ' Tel. 1-216-836 3854
50 '............rev. 28 SEP 96
60 IF EX$=""THEN EX$="EXIT"
70 CLS
80 COLOR 7,0,1
90 PI=3.14159
100 U$="##,###.###"
110 UL$=STRING$(80,205)
120 '
130 '.....start
140 CLS
150 COLOR 15,2,1
160 PRINT " TRAP DIPOLE - 3 BAND SINGLE TRAP";
170 PRINT TAB(57);"by A.C.(AL) Buxton W8NX ";
180 COLOR 1,0:PRINT STRING$(80,223);
190 COLOR 7,0
200 PRINT " Press number in < > to:
210 PRINT UL$;
220 PRINT " < 1 > RUN program"
230 PRINT " < 0 > EXIT"
240 PRINT UL$;
250 Z$=INKEY$
260 IF Z$="0"THEN CLS:RUN EX$
270 IF Z$="1"THEN 410
280 GOTO 250
290 '
300 '.....L/C trap
310 CLS
320 PRINT "In the program to follow, start your design procedure by selecting"
330 PRINT "the L/C Tuned Circuit option from the menu, then enter only your"
340 PRINT "lowest operating frequency and a reactance of 180 ohms. Then use"
350 PRINT "the coil design options to select a coil."
360 PRINT
370 PRINT "Press any key to continue.............."
380 IF INKEY$=""THEN 380
390 CLS:RUN"\bas\prog\tunecct"
400 '
410 '.....start
420 PRINT " Do you want the program preamble? (y/n)"
430 P$=INKEY$
440 IF P$="Y"OR P$="y"THEN COLOR 7,0,0:GOTO 480
450 IF P$="N"OR P$="n"THEN COLOR 7,0,0:GOTO 620
460 GOTO 430
470 '
480 '.....preamble
490 CLS
500 OPEN"I",1,"\data\docfiles\trapdsgn.txt"
510 LN=0
520 IF EOF(1)THEN 590
530 LN=LN+1
540 INPUT#1,A$
550 PRINT " ";A$;
560 IF LN<24 THEN PRINT "":GOTO 580
570 LN=0:GOSUB 4430:CLS 'screen dump
580 GOTO 520
590 CLOSE
600 GOTO 4380 'end
610 '
620 '.....input data
630 CLS
640 '.....graphics subroutine
650 LINE INPUT "ENTER: Today's date.......................................? ";D$
660 IF D$=""THEN LOCATE CSRLIN-1:GOTO 650
670 INPUT "ENTER: Lowest operating frequency in MHz..................";FL
680 IF FL=0 THEN LOCATE CSRLIN-1:GOTO 670
690 INPUT "ENTER: Medium operating frequency in MHz..................";FM
700 IF FM=0 THEN LOCATE CSRLIN-1:GOTO 690
710 INPUT "ENTER: Harmonic operating frequency in MHz................";FHAR
720 IF FHAR=0 THEN LOCATE CSRLIN-1:GOTO 710
730 INPUT "ENTER: The order of the odd harmonic frequency............";ORDER
740 IF ORDER=0 THEN LOCATE CSRLIN-1:GOTO 730
750 INPUT "ENTER: Diameter of wire radiating elements in inches......";DW
760 IF DW=0 THEN LOCATE CSRLIN-1:GOTO 750
770 PRINT "PRESS number in < > to select:"
780 PRINT " <1> Coaxial traps
790 PRINT " <2> Open Inductor-Capacitor traps
800 Z$=INKEY$
810 IF Z$="1"THEN TT$="C":GOTO 840
820 IF Z$="2"THEN TT$="O":GOTO 840
830 GOTO 800
840 INPUT "ENTER: Estimated outside diameter of trap (inches)........";DT
850 IF DT=0 THEN LOCATE CSRLIN-1:GOTO 840
860 INPUT "ENTER: Estimated length of trap (inches)..................";LH
870 IF LH=0 THEN LOCATE CSRLIN-1:GOTO 860
880 INPUT "ENTER: Estimated Q of trap................................";QTRAP
890 IF QTRAP=0 THEN LOCATE CSRLIN-1:GOTO 880
900 FPSEUDO=FHAR 'harmonic freq. antenna would have if trap were removed
910 '
920 '****************************************
930 '.....start of iterative loop
940 '****************************************
950 CONVCHK=0 'restet convergence check flag
960 FOR AB=1 TO 10: 'design goes through 10 iterations
970 KA=1 'initial assumed value for dipole length factor is 1
980 FMHZ=FHAR 'the subroutine iterates to the correct value
990 '
1000 GOSUB 4180 'get KA,Z),XCE,CE
1010 'KA= length factor
1020 'CE= equivalent end capacitance
1030 'XCE= equivalent end capacitve reactance
1040 'ZO= characteristic impedance of lambda/2 wire section
1050 ZT=983.57*(ORDER-1+KA)/4/FPSEUDO
1060 'ZT= total length of monopole antenna
1070 FMHZ=FM 'medium frequency
1080 '
1090 GOSUB 4180 'get KA,Z0,XCE,CE
1100 CS=0.8*SQR(LH*DT) 'stray shunt capacity of trap to free space
1110 IF TT$="O" THEN CS=1.2*SQR(LH*DT):Z0=1000*SQR(L/C)
1120 'LH = trap length
1130 'DT = trap diameter in inches
1140 XCE=-Z0*TAN(KA*PI/2) 'reactance of the end capacitance
1150 CE=-10^6/2/PI/FM/XCE
1160 CSP=CS+CE-0.18*SQR(LH*DT)
1170 'CSP is the combined effect of the trap stray capacity in free space and 1215 'the end capacitance due to fringing of the electrical field. It assumes 1216 'a 9% negative mutual coupling coefficient
1180 XCSP=-10^6/2/PI/FM/CSP
1190 KAP=ATN(-XCSP/Z0)*2/PI
1200 'KAP = total length factor of dipole at medium frequency FM
1210 Z1=983.57*KAP/4/FM 'length of inner segment
1220 Z3=ZT-Z1 'length of outer segment
1230 FMHZ=FL
1240 '
1250 '.....convergence check
1260 IF CONVCHK THEN 1330
1270 CLS
1280 COLOR 0,7
1290 PRINT " CHECKING THE DESIGN CALCULATIONS FOR CONVERGENCE......."